package text;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class text2 {

	public static void main(String[] args) {
		String fileName = "d:/Text.text";
		int count = 1000 * 10000;
		PrintWriter pWriter = null;
		try {
			pWriter = new PrintWriter(fileName);

			for (int i = 0; i < count; i++) {
				pWriter.println("1");
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			pWriter.close();
		}
	}

	public void ScannerText() {
		Scanner scanner = null;
		try {
			scanner = new Scanner(new File("d:/Text.text"));
			while (scanner.hasNextLine()) {
				scanner.nextLine();

			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			scanner.close();
		}

	}

	public void BufferedText() throws IOException {
		BufferedReader bf = null;
		bf = new BufferedReader(new FileReader("d:/Text.text"));
		String line = null;
		while ((line = bf.readLine()) != null);
		bf.close();

	}

}
